package tg.app.rj.payreqw;

import java.rmi.RemoteException;
import java.text.SimpleDateFormat;
import java.util.Date;

import psdi.mbo.MboSet;
import psdi.mbo.MboSetRemote;
import psdi.mbo.StatefulMbo;
import psdi.mbo.StatefulMboRemote;
import psdi.mbo.StatusHandler;
import psdi.server.MXServer;
import psdi.util.MXException;
import tg.app.rj.util.CommonUtil;
import tg.app.rj.workflow.WfMboRemote;

/***
 * 
 * @author pzx
 *
 */
public class Payreqww extends StatefulMbo implements WfMboRemote {
	
	public Payreqww(MboSet mboset) throws RemoteException {
		super(mboset);
	}

	public void add() throws MXException, RemoteException {
		super.add();
		setValue("siteid", getInsertSite(), 11L);
		setValue("orgid", getInsertOrganization(), 11L);
	}

	protected StatusHandler getStatusHandler() {
		//System.out.println(this.getClass().getName()+">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>... getStatusHandler ");
		return new PayreqwwStatusHandler(this);
	}

	protected MboSetRemote getStatusHistory() throws MXException,
			RemoteException {
		// System.out.println(this.getClass().getName()+">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>... getStatusHistory ");
		return getMboSet("PAYREQWWSTATUS");
	}

	public String getStatusListName() {
		// System.out.println(this.getClass().getName()+">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>... getStatusListName ");
		return "PAYWSTATUS";
	}

	public String getAttributeName() throws MXException, RemoteException {
		return "PAYNUM";
	}
}